<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="header.jsp"%>
<div class="clearfix"></div>
<div class="row">
    <div class="col-md-12 col-sm-12 col-xs-12">
        <div class="x_title">
            <h2>学生信息修改 <i class="fa fa-user"></i>${student.name}</h2>
            <div class="clearfix"></div>
        </div>
        <form class="form-horizontal form-label-left" action="${pageContext.request.contextPath }/teacher/studentUpdate" method="post">
        <div class="x_title">
            <h2>学生基础信息</h2>
            <div class="clearfix"></div>
        </div>
        <div class="x_content1">
                <div class="item form-group">
                    <div style="color: red">${sError}</div>
                    <input type="hidden" name="id" value="${student.id}">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">学号 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" name="userId" value="${student.userId}" type="text">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" class="form-control col-md-7 col-xs-12" name="name" value="${student.name}">
                    </div>
                </div>

                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">学院<span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <select name="college">
                            <c:forEach var="colleges" items="${colleges}">
                                <option value="${colleges.college}" <c:if test="${student.college==colleges.college}">selected="selected"</c:if>>
                                        ${colleges.college}
                                </option>
                            </c:forEach>
                        </select>
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">入学年份 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input class="form-control col-md-7 col-xs-12" name="year" value="${student.year}" type="text">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">所在班级 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" value="${student.classs}" name="classs" class="form-control col-md-7 col-xs-12">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">专业 <span class="required">*</span>
                    </label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <select name="major">
                            <c:forEach var="majors" items="${majors}">
                                <option value="${majors.major}" <c:if test="${student.major==majors.major}">selected="selected"</c:if>>
                                        ${majors.major}
                                </option>
                            </c:forEach>
                        </select>
                    </div>
                </div>

                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">性别 <span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="radio" name="sex" value="0" <c:if test="${student.sex== '0'}">checked="checked"</c:if>>男
                        <input type="radio" name="sex" value="1" <c:if test="${student.sex== '1'}">checked="checked"</c:if>>女
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">联系电话 <span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" class="form-control col-md-7 col-xs-12" name="mobilePhone" value="${student.mobilePhone}">
                    </div>
                </div>
                <div class="item form-group">
                    <label class="control-label col-md-3 col-sm-3 col-xs-12">班主任ID<span class="required">*</span></label>
                    <div class="col-md-6 col-sm-6 col-xs-12">
                        <input type="text" class="form-control col-md-7 col-xs-12" name="teacherId" value="${student.teacherId}">
                    </div>
                </div>
        </div>
            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_title">
                    <h2>学生成绩</h2>
                    <div class="clearfix"></div>
                </div>
                <div class="col-sm-12">
                    <div style="color: red">${gError}</div>
                    <table id="datatable-responsive" class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
                           cellspacing="0" width="100%" role="grid" aria-describedby="datatable-responsive_info" style="width: 100%;">
                        <thead>
                        <tr role="row">
                            <th class="sorting">学号</th>
                            <th class="sorting">思想分</th>
                            <th class="sorting">文化分</th>
                            <th class="sorting">身心分</th>
                            <th class="sorting">人文素质分</th>
                            <th class="sorting">职业素质分</th>
                            <th class="sorting">总分</th>
                            <th class="sorting">排名</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr>
                            <td><input size="10" name="studentId" readonly="readonly" value="${grade.studentId}"></td>
                            <td><input size="10" name="iq" value="${grade.iq}"></td>
                            <td><input size="10" name="cq" value="${grade.cq}"></td>
                            <td><input size="10" name="pmq" value="${grade.pmq}"></td>
                            <td><input size="10" name="hq" value="${grade.hq}"></td>
                            <td><input size="10" name="pq" value="${grade.pq}"></td>
                            <td><input size="10" readonly="readonly" value="${grade.total}"></td>
                            <td><input size="10" readonly="readonly" value="${grade.ranking}"></td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="col-sm-12">
                        <table class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
                               cellspacing="0" width="100%" role="grid" aria-describedby="datatable-responsive_info" style="width: 100%;">
                            <tr>
                                <td width="100px">思想评语</td>
                                <td><input type="text" size="120" name="iqComment" value="${grade.iqComment}"></td>
                            </tr>
                            <tr>
                                <td>文化评语</td>
                                <td><input type="text" size="120" name="cqComment" value="${grade.cqComment}"></td>
                            </tr>
                            <tr>
                                <td>身心评语</td>
                                <td><input type="text" size="120" name="pmqComment" value="${grade.pmqComment}"></td>
                            </tr>
                            <tr>
                                <td>人文素质评语</td>
                                <td><input type="text" size="120" name="hqComment" value="${grade.hqComment}"></td>
                            </tr>
                            <tr>
                                <td>职业素质分</td>
                                <td><input type="text" size="120" name="pqComment" value="${grade.pqComment}"></td>
                            </tr>
                        </table>
                    </div>
                </div>
            </div>
            <div style="text-align: center">
                <button type="submit"  class="btn btn-success">保存修改</button>
                <button type="button" class="btn btn-primary" onclick="javascript:window.history.back(-1);">返回</button>
            </div>
        </form>
        <br/><br/><br/>
    </div>
<%@include file="footer.jsp"%>